package dao;


import entity.User;

/**
 * 用户操作相关的DAO
 * @author Administrator
 *
 */
public class UserDao extends DangDao {

	protected String getNameSpace() {
		return User.class.getSimpleName().toLowerCase();
	}
	
	public User queryUserByEmail(String email) throws Exception{
		return (User) queryForObject("queryUserByEmail", email);
	}
	
	public void saveUser(User user) throws Exception{
		insert("saveUser", user);
	}
	
	public void updateUser(User user) throws Exception {
		update("updateUser", user);
	}
}
